package com.example.kotlindemo

import com.example.kotlindemo.demo.*
import org.junit.Test

class Unit10Test {
    @Test
    fun unit10test() {
        Unit10().testA()
        Unit10().testFunB()
        Unit10().checkKind("123")
        Unit10().checkKind(123)
        Unit10().checkKind(123.1)
        Unit10().checkKind(true)

        var c = Unit10.C("name")
        println(c.testC())
        var e = Unit10.E("nameE")
        println(e.testE("testE()"))

        var a: Unit10.G<*> = Unit10.G("test", 12, Unit10.Person("小明"))
        var a1 : Unit10.G<Any?> = Unit10.G("test", 12, Unit10.Person("小明"))
        println(a == a1)
        var person = a.t3
        println(person.toString())
        var apple1 = person as Unit10.Person
        println(apple1.toString())

        var arr:Array<*> = arrayOf("123",123,Unit10.Person("小明"))
        for (any in arr) {
            println(any.toString())
        }
    }
}